package UMC.Web;

public class UIDateSheetDialog extends UIDialog {
    public UIDateSheetDialog(String start, String end) {
        super();
        this.value(start + "," + end);
    }

    public UIDateSheetDialog(String start) {
        super();
        this.value(start);
        this.setSingleDate(true);
    }

    public UIDateSheetDialog() {
        super();
    }

    @Override
    protected String type() {
        return "DateSheet";
    }

    public UIDateSheetDialog setSingleDate(boolean value) {

        if (value) {
            this.config.put("IsSingleDate", true);
        } else {

            this.config.remove("IsSingleDate");
        }

        return this;
    }

    public UIDateSheetDialog setSingleTitle(String text) {
        this.config.put("StartTitle", text);
        return this;
    }
    public UIDateSheetDialog setStartTitle(String text) {
        this.config.put("StartTitle", text);
        return this;
    }

    public UIDateSheetDialog setEndTitle(String text) {
        this.config.put("EndTitle", text);
        return this;
    }

}
